-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: r/demo/foo20airdrop - Merkle Airdrop contract example #906
base: master
Are you sure you want to change the base?
Conversation
2060eff
to
2675ea9
Compare
type AirdropData struct { | ||
Address std.Address | ||
// TODO: use std.Coin | ||
Amount uint64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better control and data integrity, keep the fields in the Airdrop
struct unexported.
To maintain easy marshaling with the Bytes
helper, consider this approach:
type Airdrop struct {
data struct {
Address std.Address
Amount uint64
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 💯
Please see @moul's comments, otherwise we should be good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just blocking since there are several changes. Let’s make an additional round of reviews.
There is tests issue once rebased with master. There is a situation to figure out, with When Possible fix could be to update in |
Related (and depending?) on #952 |
Hey @albttx, What's the status of this PR? |
7c384db
to
2588613
Compare
Want to take a final look? Cannot merge without your approval. |
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
8729633
to
9e2e371
Compare
9e2e371
to
e594a2b
Compare
e594a2b
to
de0677f
Compare
Rebased, CI green, waiting for final reviews @moul |
Can you provide an example, perhaps in txtar format, or as a mini app in JavaScript, Go, or another language, using this from an external perspective? |
@moul i've previously add a small js app in misc/ to explain how it's work but @leohhhn reviews asked to remove it... (97ca397 ) I will work on a small example app. |
Description
This PR bring an example for a merkle airdrop contract.
p/demo/airdrop
r/demo/foo20airdrop
How it's works ?
A merkle airdrop contract works by saving off-chain the elements of the merkle tree. ONLY the Merkle root is saved on the realm.
To confirm an element is present, we just need to send to the contract a merkle proof.